/**
 * 
 */
package com.zcy.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;


/**
 * @author 周成瑜
 * 
 */
@Entity
@Table(name = "tuser", schema = "test")
public class User {

	@Override
	public String toString() {
		return "User [id=" + id + ", username=" + username + ", password="
				+ password + ", creattime=" + creattime + ", modifytime="
				+ modifytime + "]";
	}

	@Id
	@Column(name = "ID", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	@Column(name = "NAME", unique = true, nullable = false, length = 20)
	private String username;
	@Column(name = "password", nullable = false, length = 32)
	private String password;
	@Column(name="creattime",unique=true,nullable=false)
	private Date creattime;
	@Column(name="modifytime",unique=false,nullable=true)
	private Date modifytime;

	public Date getCreattime() {
		return creattime;
	}

	public void setCreattime(Date creattime) {
		this.creattime = creattime;
	}

	public Date getModifytime() {
		return modifytime;
	}

	public void setModifytime(Date modifytime) {
		this.modifytime = modifytime;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
}
